﻿/*
 * Copyright 2014 Francois Karman
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System.Collections.Generic;

namespace Quartz.WebManager.Model
{
    /// <summary>
    /// Represents a class that implements the <c>Quartz.IJob</c> interface.
    /// </summary>
    public class JobDefinition
    {
        /// <summary>
        /// The available properties for this job definition.
        /// </summary>
        private readonly ICollection<DataPropertyInfo> properties;

        /// <summary>
        /// Initializes a new instance of the <see cref="JobDefinition"/> class.
        /// </summary>
        public JobDefinition()
        {
            this.properties = new LinkedList<DataPropertyInfo>();
        }

        /// <summary>
        /// Gets or sets the name used to display this class to the user.
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// Gets or sets the full name of the class, with its assembly.
        /// </summary>
        public string TypeName { get; set; }

        /// <summary>
        /// Gets or sets the description of the job, if any.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Gets the available properties for this job definition.
        /// </summary>
        public ICollection<DataPropertyInfo> Properties
        {
            get { return this.properties; }
        }
    }
}